286fa2e12378e937a93f116ff9cc1ff8dc15d251,opennms-services/src/main/java/org/opennms/netmgt/threshd/JdbcIfInfoGetter.java,JdbcIfInfoGetter,getIfLabel,#number#String#,63
Before Change
public String getIfLabel(int nodeId, String ipAddress) {
// Get database connection
java.sql.Connection dbConn = null;
try {
dbConn = DataSourceFactory.getInstance().getConnection();
} catch (SQLException e) {
//log().error("checkIfDir: Failed getting connection to the database: " + e, e);
throw new UndeclaredThrowableException(e);
}
// Make certain we close the connection
String label = null;
try {
label = IfLabel.getIfLabel(dbConn, nodeId, ipAddress);
} catch (SQLException e) {
} finally {
// Done with the database so close the connection
try {
if (dbConn != null) {
dbConn.close();
}
} catch (SQLException e) {
}
}
return label;
}
}
After Change
}
public String getIfLabel(int nodeId, String ipAddress) {
return IfLabel.getIfLabel(nodeId, ipAddress);
}
}